From cc78f77c86b5a17dcd4aed5748fde1c5c6664af9 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 19 May 2005 21:11:51 +0000 Subject: [PATCH] bitkeeper revision 1.1466.2.1 (428d01177uVxPlsgcWtGU3xUZaKeJw) Rename memparse() to parse_size_and_unit(). A more general-purpose name, and avoids unecessary clash with Linux function name. Signed-off-by: Keir Fraser --- xen/arch/x86/domain_build.c | 2 +- xen/arch/x86/e820.c | 2 +- xen/common/lib.c | 2 +- xen/include/xen/lib.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c index 0bda826f7a..a8c66d6281 100644 --- a/xen/arch/x86/domain_build.c +++ b/xen/arch/x86/domain_build.c @@ -26,7 +26,7 @@ static unsigned int opt_dom0_mem; static void parse_dom0_mem(char *s) { - unsigned long long bytes = memparse(s); + unsigned long long bytes = parse_size_and_unit(s); /* If no unit is specified we default to kB units, not bytes. */ if ( isdigit(s[strlen(s)-1]) ) opt_dom0_mem = (unsigned int)bytes; diff --git a/xen/arch/x86/e820.c b/xen/arch/x86/e820.c index 9749a0eac9..aa41ac78da 100644 --- a/xen/arch/x86/e820.c +++ b/xen/arch/x86/e820.c @@ -5,7 +5,7 @@ /* opt_mem: Limit of physical RAM. Any RAM beyond this point is ignored. */ unsigned long long opt_mem; -static void parse_mem(char *s) { opt_mem = memparse(s); } +static void parse_mem(char *s) { opt_mem = parse_size_and_unit(s); } custom_param("mem", parse_mem); struct e820map e820; diff --git a/xen/common/lib.c b/xen/common/lib.c index 6c0706f1f1..764ad7143d 100644 --- a/xen/common/lib.c +++ b/xen/common/lib.c @@ -441,7 +441,7 @@ s64 __moddi3(s64 a, s64 b) #endif /* BITS_PER_LONG == 32 */ -unsigned long long memparse(char *s) +unsigned long long parse_size_and_unit(char *s) { unsigned long long ret = simple_strtoull(s, &s, 0); diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h index 56eae9d9b5..719e0f0d4f 100644 --- a/xen/include/xen/lib.h +++ b/xen/include/xen/lib.h @@ -66,6 +66,6 @@ long long simple_strtoll( unsigned long long simple_strtoull( const char *cp,char **endp, unsigned int base); -unsigned long long memparse(char *s); +unsigned long long parse_size_and_unit(char *s); #endif /* __LIB_H__ */ -- 2.30.2